package com.mobi.cacti.rabbit.response;

import java.util.LinkedHashMap;
import java.util.Map;



public class ReqMobileLogin
{
	public String ReqSessionID, ResSessionID, Code_Response;    
	public Map<String, GraphCircuit>	responseCircuitIDWhenLogin;

	public String ContactNumber = "";
	public String ContactEmail;
	
	public boolean isLoginSuccess(){

		if(Code_Response.equals("9000"))
			return true;
		else if(Code_Response.equals("8000"))
			return false;
		else if(Code_Response.equals("9999"))
			return true;
		else if(Code_Response.equals("1111"))
			return false;
		else if(Code_Response.equals("2222"))
			return false;
		else if(Code_Response.equals("3333"))
			return false;
		else if(Code_Response.equals("99999"))
			return true;
		else
			return false;
	}
	
	public String getCodeResponseMessage(){
		
		String result ="";
		if(Code_Response.equals("9000"))
			result = "App Username and Pass authen SuccessFull.";
		else if(Code_Response.equals("8000"))
			result = "App Username and Pass authen Fail.";
		else if(Code_Response.equals("9999"))
			result = "Authen SuccessFull.";
		else if(Code_Response.equals("1111"))
			result = "Authen Fail.";
		else if(Code_Response.equals("2222"))
			result = "Username unknow";
		else if(Code_Response.equals("3333"))
			result = "Password unknow";
		
		result = "Invalid username or password";
		
		return result;
	}
	
	public void initLinked()
	 {
		 if(null == responseCircuitIDWhenLogin)
			 responseCircuitIDWhenLogin = new LinkedHashMap<String, GraphCircuit>();
	 }	
}
